<?php
require 'core/header.php';
if (isset($_SESSION['uid'])) {
    if (! $_SESSION['rank'] == '10')
        header('Location:forum.php');
}
?>
<h3>用户注册</h3>
<form method="post" action="post.php">
	<p>
		用户名: <input id="username" name="username" type="text" value="" />
	</p>
	<p>
		密&nbsp;&nbsp;&nbsp;码: <input id="password" name="password" type="password" value="" />
	</p>
			<?php
if (isset($_SESSION["rank"])) {
    if ($_SESSION["rank"] == 10) {
        ?>
			    <p>
		是否设定为管理员:
                    <input id="rank" type="checkbox" value="10" />
	</p>
			    <?php
    } else {
        ?>
			<input id="rank" type="hidden" value="0" />
			    <?php
    }
} else {
    ?>
			<input id="rank" type="hidden" value="0" />
			    <?php
}
?>
			<input type="button" onclick="history.go(-1)" value="返回"><input
		name="submit" type="button" onclick="ajaxpost_signin()" value="注册" />
		<a href="login.php">已有账号，登录</a>
</form>
<?php
require 'core/footer.php';
?>